//
//  ViewController.m
//  UI16-UICollectionViewCycleImage
//
//  Created by 韩旭 on 16/8/4.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "ViewController.h"
#import "HX_CycleImage.h"

@interface ViewController ()
@property (weak, nonatomic) IBOutlet HX_CycleImage *imageControllerView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
//    HX_CycleImage *hx_cycle = [[HX_CycleImage alloc] initWithFrame:CGRectMake(0, 0, kWidth, 200)];
//    [self.view addSubview:hx_cycle];
    NSMutableArray *arr = [NSMutableArray array];
    for (int i = 0; i < 5; i ++) {
        [arr addObject:[NSString stringWithFormat:@"%d.jpg", i]];
    }
    NSString *firstImage = [arr firstObject];
    NSString *lastImage = [arr lastObject];
    [arr insertObject:lastImage atIndex:0];
    [arr addObject:firstImage];
    _imageControllerView.arrDataSource = arr;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
